package ttsolver.enums;

import java.util.HashMap;

public enum TrackType {
	MAIN_ZERO("0"),
	MAIN_ONE("1"),
	MAIN_TWO("2"),
	SWITCH("SW"),
	SIDING("S"),
	CROSSOVER("C");
	private String name;
	
	private TrackType(String name){
		this.name = name;
	}
	
	public String getName(){ return this.name; }
	
	public static TrackType getType(String s){
		if(s.equals(MAIN_ZERO.getName()))
			return MAIN_ZERO;
		if(s.equals(MAIN_ONE.getName()))
			return MAIN_ONE;
		if(s.equals(MAIN_TWO.getName()))
			return MAIN_TWO;
		if(s.equals(SWITCH.getName()))
			return SWITCH;
		if(s.equals(SIDING.getName()))
			return SIDING;
		if(s.equals(CROSSOVER.getName()))
			return CROSSOVER;
		return null;
	}
}
